		/*
		Alert("我是中国人");
		*/
var builder = require("../../mlib/layer/builder");
var merge = require("mlib/json/merge");
var touch = require("mlib/evt/touch");
var alertRender = require("../layer/alert.ejs");

module.exports = function(msg,opts,callback) {
    opts = merge({        
        "content" : msg || "", // 消息内容
        "title" : "温馨提示",
		"okFn":function(){
			
		}
    }, opts || {});
	
    var m_alert = null ;

    m_alert = builder.createFromHTML(alertRender(opts), {
        "mask": true
    });

    m_alert.show({
    	"afterAnimate":function(){
			var container = m_alert.getOuter();
           touch.on(container, "tap",".tip-close", function(){
			   opts.okFn();
			   m_alert.hide();
		   });
    	}
    });
    m_alert.setMiddle();
}

